package com.tjh.gulimall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tjh.common.to.mq.OrderTo;
import com.tjh.common.to.mq.StockLockedTo;
import com.tjh.common.utils.PageUtils;
import com.tjh.gulimall.ware.entity.WareSkuEntity;
import com.tjh.gulimall.ware.vo.SkuHasStockVo;
import com.tjh.gulimall.ware.vo.WareSkuLockVo;

import java.util.List;
import java.util.Map;

/**
 * Create by koala on 2021-01-24 21:56:11
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //day52
    List<SkuHasStockVo> getSkuHasStock(List<Long> skuIds);

    //day123：锁库存
    Boolean orderLockStock(WareSkuLockVo vo);

    //day130：解锁库存
    void unlockStock(StockLockedTo to);

    //day131：订单超时未支付进行关单后的库存解锁操作
    void unlockStock(OrderTo orderTo);
}

